﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.Common;
using System.Data.OleDb;

namespace SysOperationLayer.DBHandle
{
    public class ParamterExampleDB : DBBase
    {
        /// <summary>
        /// 写日志
        /// </summary>
        /// <param name="UserID"></param>
        /// <param name="strServerIP"></param>
        /// <param name="strMessage"></param>
        /// <param name="datatime"></param>
        public void Log(string UserID, string strServerIP, string strMessage, string datatime)
        {
            if (m_objDB != null)
            {
                m_objDB.prepareStatement("insert into DBF_LOG(@UserID, @ServerIP, @Message, @LogDate)");
                m_objDB.addParameter("ServerIP", UserID);
                m_objDB.addParameter("Message", strMessage);
                m_objDB.addParameter("LogDate", datatime);

                m_objDB.executeStatement();
            }
            else
            {
                m_strMessage = "未连数据库";
            }
        }

    }
}
